#include <iostream>
#include <string>
#include <sys/types.h>
#include <signal.h>

int main(int argc, char* argv[]) 
{
    if(argc != 3)
    {
        std::cout<<"./mykill signumber pid" <<std::endl;
        return 1;
    }
    int signum = atoi(argv[1]);
    pid_t pid = atoi(argv[2]);

    if(kill(pid, signum) == -1)
    {
        std::cout<<"kill failed"<<std::endl;
        return 1;
    }
    std::cout<<"kill process "<<pid<<" with signal "<<signum<<" success"<<std::endl;
    
    return 0;
}